package com.junlinpro;

import org.springframework.stereotype.Component;

@Component
public class OpusSdk {

    public OpusSdk() {
        try {
            LibLoader.loadLib("libopus.so");
        } catch (UnsatisfiedLinkError ulink) {
            ulink.printStackTrace();
        }
    }

    public native long initDecoder();

    public native int opusDecoder(long decoderId, byte[] encoder, short[] decoder);

    public native void destroy(long decoderId);

}
